/* SPDX-License-Identifier: GPL-2.0 */
/*  Himax Android Driver Sample Code for modularize functions
 *
 *  Copyright (C) 2021 Himax Corporation.
 *
 *  This software is licensed under the terms of the GNU General Public
 *  License version 2,  as published by the Free Software Foundation,  and
 *  may be copied,  distributed,  and modified under those terms.
 *
 *  This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 */

#ifndef __HIMAX_IC_USAGE_H__
#define __HIMAX_IC_USAGE_H__

#if defined(CONFIG_TOUCHSCREEN_HIMAX_IC_HX83191)
extern bool _hx83191_init(void);
#endif
#if defined(CONFIG_TOUCHSCREEN_HIMAX_IC_HX83192)
extern bool _hx83192_init(void);
#endif
#if defined(CONFIG_TOUCHSCREEN_HIMAX_IC_HX83193)
extern bool _hx83193_init(void);
#endif

extern struct fw_operation *pfw_op;
extern struct ic_operation *pic_op;
extern struct flash_operation *pflash_op;
extern struct driver_operation *pdriver_op;

#if (HX_EXCP_RECOVERY == 0x01)
extern u8 HX_EXCP_RESET_ACTIVATE;
#endif

extern struct himax_ts_data *private_ts;
extern struct himax_core_fp g_core_fp;
extern struct himax_ic_data *ic_data;

extern void himax_parse_assign_cmd(uint32_t addr, uint8_t *cmd, int len);

extern int himax_bus_read(uint8_t command, uint8_t *data, uint32_t length,
			  uint8_t toRetry);
extern int himax_bus_write(uint8_t command, uint8_t *data, uint32_t length,
			   uint8_t toRetry);

extern void himax_int_enable(int enable);

#endif
